﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Add.aspx.cs" Inherits="WinnerCMS.WebUI.Admin.Photo.Add" %>
<%@ Import Namespace="WinnerCMS.BLL" %>
<!doctype html>
<html>
<head id="Head1" runat="server">
    <title></title>
    <meta charset="utf-8">
    <meta content="no-cache" http-equiv="Pragma" />
    <%: Scripts.Render("~/Scripts/AdminBase") %>
    <script src="../../Scripts/jquery.validate.min.js" type="text/javascript"></script> 
    <script src="../../Scripts/Uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
    <script src="Add.js" type="text/javascript"></script>

    <%: Styles.Render("~/Content/Bootstrap/css") %>
    <link href="../../Scripts/Uploadify/uploadify.css" rel="stylesheet" type="text/css" />
    
    <style type="text/css">
        .RowTitle
        {
            width: 100px;
            font-weight: bold;
            text-align: right;
        }
        #t_Content
        {
            border: 0;
            margin: 0;
            border-collapse: collapse;
        }
        #t_Content td
        {
            padding: 0;
        }
        
        #thumbnails
        {
            min-height: 200px;
            _height: expression(document.body.clientHeight > 200? "200px": "auto" );
        }
        #thumbnails div.thumbshow, div.sortable-placeholder
        {
            text-align: center;
            margin: 2px;
            padding: 2px;
            width: 162px;
            height: 155px;
            border: solid 1px #CCCCcc;
            float: left;
        }
        #thumbnails div.thumbshow img
        {
            width: 130px;
            height: 92px;
            border: 1px solid #CCCCcc;
            padding: 1px;
            margin: 5px;
        }
    </style>

</head>
<body>
    <form id="Form1" method="post" runat="server">
    <div id="tabs" class="easyui-tabs">
     
        <div id="A" title="常规属性">
            <table class="table table-bordered table-condensed table-hover">
                <tr>
                    <td class="RowTitle">
                        <font color="#ff0000">*</font>标题：
                    </td>
                    <td>
                        <asp:TextBox ID="txtTitle" runat="server" Width="250px"></asp:TextBox>
                      
                       <input type="button" class="btn btn-default" onclick="CheckTitle();"
                                value="检查重名" />
                    </td>
                </tr>
                <tr runat="server" id="trKey">
                    <td class="RowTitle">
                        关 键 字：
                    </td>
                    <td>
                        <asp:TextBox ID="txtKey" runat="server" 
                            Width="250px"></asp:TextBox>
                        <input id="btnGetTag" type="button" onclick="GetTag(<%= Request["ModelId"] %>)" class="btn btn-default"
                            value="更多" />&nbsp;<img src="../../Images/help.gif" alt="" width="16" height="16"
                                title="如果要输入多关键字请用“|”分割" />
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        <font color="#ff0000">*</font> 所属栏目：
                    </td>
                    <td>
                        <WinnerCMS:DropDownListX ID="ddlCategory" runat="server" CausesValidation="True">
                        </WinnerCMS:DropDownListX>
                    </td>
                </tr>
                <tr runat="server" id="trSpecialID">
                    <td class="RowTitle">
                        专题栏目：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlSpecialID" runat="server">
                            <asp:ListItem Value="0">不属于任何专题</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr runat="server" id="trAuthor">
                    <td class="RowTitle">
                        作 者：
                    </td>
                    <td>
                        <asp:TextBox ID="txtAuthor" runat="server" 
                            Width="250px"></asp:TextBox>
                        <input id="btnAuthorMore" onclick="AuthorMore();" class="btn btn-default" type="button" value="更多" />
                    </td>
                </tr>
                <tr runat="server" id="trFrom">
                    <td class="RowTitle">
                        来源：
                    </td>
                    <td>
                        <asp:TextBox ID="txtFrom" Width="250px" runat="server" ></asp:TextBox>
                        <input id="btnFromMore" onclick="FromMore();" class="btn btn-default" type="button" value="更多" />
                    </td>
                </tr>
            
                <tr>
                    <td class="RowTitle">
                        设置：
                    </td>
                    <td class="icheckboxStyle">
                       <BootStrap:CheckBox ID="cbkIncludePic" runat="server" Text='含图' />
                        <BootStrap:CheckBox ID="cbkIsSlide" runat="server" Text="幻灯片" />
                        <BootStrap:CheckBox ID="cbkAllowComment" runat="server" Text='允许评论' />
                        <BootStrap:CheckBox ID="cbkIsHeadline" runat="server" Text="头条" />
                        <BootStrap:CheckBox ID="cbkIsOnTop" runat="server" Text='置顶' />
                        <BootStrap:CheckBox ID="cbkIsElite" runat="server" Text='推荐' />
                        <BootStrap:CheckBox ID="cbkIsChecked" runat="server" Text="审核" />
                        <BootStrap:CheckBox ID="cbkIsDraft" runat="server" Text="稿件" />
                    </td>
                </tr>
                <tr runat="server" id="trPicUrl">
                    <td class="RowTitle" valign="top">
                        缩略图地址：
                    </td>
                    <td>
                        <asp:TextBox ID="txtPicUrl" runat="server" Width="250px"></asp:TextBox>
                        <br />
                        <input type="file" name="UP_PicUrl" id="UP_PicUrl" />
                        <input id="现有图片" type="button" value="现有图片" onclick='GetImage();' class="btn btn-default" />
                        <br />
                        缩略图大小：
                        <asp:TextBox ID="txtPicW" runat="server" Width="60px" Text="240"></asp:TextBox>
                        *
                        <asp:TextBox ID="txtPicH" runat="server" Width="60px" Text="180"></asp:TextBox>
                        <BootStrap:CheckBox ID="cbkBiLi" runat="server" Checked="True" Text="按比例缩小" />
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        内容：
                    </td>
                    <td  class="icheckboxStyle">
                        <BootStrap:CheckBox ID="cbkDownPic" runat="server" Text="下载站外图片" />
                        <BootStrap:CheckBox ID="cbkDrawWatherMark" runat="server" Text='图片加水印' />
                    </td>
                </tr>
            </table>
        </div>
        <div id="B" title="高级属性">
            <table class="table table-bordered table-condensed table-hover">
                <tr runat="server" id="trHits">
                    <td class="RowTitle">
                        初始点击数：
                    </td>
                    <td>
                        <WinnerCMS:NumericTextBox ID="NtxtHits" runat="server" Width="85px">0</WinnerCMS:NumericTextBox>
                    </td>
                </tr>
                <tr runat="server" id="trUpDateTime">
                    <td class="RowTitle">
                        更新时间：
                    </td>
                    <td>
                        <asp:TextBox ID="txtUpDateTime" runat="server" Width="141px"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="trTemplateFileName">
                    <td class="RowTitle">
                        网页模板：
                    </td>
                    <td>
                        <asp:TextBox ID="txtTemplateFileName" runat="server" Width="250px"></asp:TextBox>
                        <input id="Button1" type="button" value="网页模板" onclick='GetTemplate();' class="btn btn-default" />
                    </td>
                </tr>

            </table>
        </div>
        <div id="C" title="摘要">
            <table class="table table-bordered table-condensed table-hover">
                <tr>
                    <td class="RowTitle">
                        摘要：
                        <div style="text-align: left; line-height: 180%; font-weight: normal;">
                            摘要将用于栏目页的简介里面。如留空系统将自动取内容里面的若干长度的文字。</div>
                    </td>
                    <td style="vertical-align: top;">
                        <asp:TextBox ID="txtBrief" runat="server" Height="150px" TextMode="MultiLine" Width="98%"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </div>
         <div id="D" title="图集">
             <div id="thumbnails">
                 
             </div>
             <div style="clear:both"><input type="file" id="UP_PhotoList" /></div>
         
         </div>
        <div id="E" title="权限设置">
            <table class="table table-bordered table-condensed table-hover">
                <tr runat="server" id="trRank">
                    <td class="RowTitle">
                        浏览等级：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlRank" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr runat="server" id="trPointNum">
                    <td class="RowTitle">
                        所需点数：
                    </td>
                    <td>
                        <WinnerCMS:NumericTextBox ID="NtxtPointNum" runat="server" Width="85px">0</WinnerCMS:NumericTextBox>
                        <img src="../../Images/help.gif" alt="" width="16" height="16" title="对于“游客”浏览等级的无效。" />
                    </td>
                </tr>
            </table>
        </div>
        <div id="F" title="自定义">
            <asp:Table ID="T_DefinedFile" BorderWidth="0" CellPadding="2" CellSpacing="1" runat="server"
                EnableViewState="true">
            </asp:Table>
        </div>
        <div id="G" title="SEO优化">
            <table class="table table-bordered table-condensed table-hover">
                <tr>
                    <td class="RowTitle">
                        页面标题：
                    </td>
                    <td>
                        <asp:TextBox ID="txtSEOTitle" runat="server" Width="250px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        页面关键字：
                    </td>
                    <td>
                        <asp:TextBox ID="txtSEOKeyWord" runat="server" TextMode="MultiLine" Rows="4" Width="98%"></asp:TextBox>
                        meta_keywords
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        页面描述：
                    </td>
                    <td>
                        <asp:TextBox ID="txtSEODescript" runat="server" TextMode="MultiLine" Rows="4" Width="98%"></asp:TextBox>
                        meta_description
                    </td>
                </tr>
            </table>
        </div>
        <div id="H" title="附属栏目">
            <table class="table table-bordered table-condensed table-hover">
                <tr>
                    <td class="RowTitle">
                        附属栏目：
                    </td>
                    <td>
                        <asp:ListBox ID="lblCategoryMap" runat="server" Width="250px" Height="250px" SelectionMode="Multiple">
                        </asp:ListBox>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <table style="width: 100%; float: left;" id="t_Content">
        <tr>
            <td>
                <WinnerCMS:CKEditorControl ID="CC_Content" runat="server" Height="300px"></WinnerCMS:CKEditorControl>
            </td>
        </tr>
    </table>
    <table style="width: 100%; float: left;" border="0" cellpadding="2" cellspacing="1">
        <tr>
            <td style="width: 180px">
                &nbsp;
            </td>
            <td>
                <asp:Button ID="btnAdd" runat="server" Text=" 添加 " 
                    Cssclass="btn btn-default" onclick="btnAdd_Click"></asp:Button>
                <asp:Button ID="btnEdit" runat="server" Text=" 修改 "
                    Cssclass="btn btn-default" onclick="btnEdit_Click"></asp:Button>
               
            </td>
        </tr>
        <tr>
            <td colspan="4">
            </td>
        </tr>
    </table>
    <asp:HiddenField ID="hfAnnexFlag" runat="server" />
    </form>
    <div id="dialog-modal">
        <iframe id="dialog-modal-url" frameborder="0" scrolling="no"></iframe>
    </div>
</body>
</html>
